package com.zxmc.server.controller.user;

import com.zxmc.common.result.Result;
import com.zxmc.pojo.entity.Comment;
import com.zxmc.server.service.CommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/comment")
@Slf4j
@Api(tags = "评论相关接口")
public class CommentController {
    @Autowired
    private CommentService commentService;
    @ApiOperation("查看评论")
    public Result<Comment> list(Integer userId,Integer novelId){
        log.info("查看评论:{},{}",userId,novelId);
        return Result.success(commentService.list(userId,novelId));
    }
}
